﻿<UserControl x:Class="ExampleControlBing.AppDemos.FloatingPanelsExample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:m="clr-namespace:Microsoft.Maps.MapControl;assembly=Microsoft.Maps.MapControl" 
    xmlns:p="clr-namespace:DeepEarth.BingMapsToolkit.Client.Controls;assembly=DeepEarth.BingMapsToolkit.Client.Controls.PersistedState"
    xmlns:fp="clr-namespace:DeepEarth.BingMapsToolkit.Client.Controls;assembly=DeepEarth.BingMapsToolkit.Client.Controls.FloatingPanel"
    xmlns:c="clr-namespace:DeepEarth.BingMapsToolkit.Client.Controls;assembly=DeepEarth.BingMapsToolkit.Client.Controls.CoordinatePanel"
    xmlns:s="clr-namespace:DeepEarth.BingMapsToolkit.Client.Controls;assembly=DeepEarth.BingMapsToolkit.Client.Controls.ScalePanel"             
    xmlns:n="clr-namespace:DeepEarth.BingMapsToolkit.Client.Controls;assembly=DeepEarth.BingMapsToolkit.Client.Controls.NavigationPanel"
    xmlns:mm="clr-namespace:DeepEarth.BingMapsToolkit.Client.Controls;assembly=DeepEarth.BingMapsToolkit.Client.Controls.MiniMap"
    xmlns:t="clr-namespace:DeepEarth.BingMapsToolkit.Client.Controls;assembly=DeepEarth.BingMapsToolkit.Client.Controls.LaunchPanel"
    xmlns:lp="clr-namespace:DeepEarth.BingMapsToolkit.Client.Controls;assembly=DeepEarth.BingMapsToolkit.Client.Controls.LayerPanel">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/DeepEarth.BingMapsToolkit.Client.Controls.FloatingPanel;component/Themes/Styles.xaml" />
                <ResourceDictionary Source="/DeepEarth.BingMapsToolkit.Client.Common;component/Resources/CommonStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
        <m:Map x:Name="map" NavigationVisibility="Collapsed" CredentialsProvider="{StaticResource MyCredentials}" />
        <fp:FloatingPanel x:Name="panelMiniMap" Title="Mini Map" ISOPrefix="MM." Style="{StaticResource FloatingPanelMini}" EnableResizer="false">
            <mm:MiniMap Name="minimap" MapName="map" BorderBrush="Transparent" Background="Transparent" />
        </fp:FloatingPanel>
        <fp:FloatingPanel x:Name="panelLayerPanel" Title="Layers" ISOPrefix="LP.">
            <lp:TreeViewLayerPanel Name="layerPanel" MapName="map" BorderBrush="Transparent" Background="Transparent" />
        </fp:FloatingPanel>
        <t:LaunchPanel Name="launchpanel" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Title="Show Tools" >
            <t:LaunchPanel.Content>
                <Canvas>
                    <c:CoordinatePanel Name="coord" MapName="map" HorizontalAlignment="Right" VerticalAlignment="Bottom" />
                    <s:ScalePanel Name="scalePanel" MapName="map" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
                </Canvas>                    
            </t:LaunchPanel.Content>
            <t:LaunchPanel.LaunchContent>
                <StackPanel Orientation="Horizontal">
                    <Button Style="{StaticResource ButtonStyle}" Content="demo" Margin="8" />
                    <Button Style="{StaticResource ButtonStyle}" Content="demo" Margin="8" />
                    <Button Style="{StaticResource ButtonStyle}" Content="demo" Margin="8" />
                    <Button Style="{StaticResource ButtonStyle}" Content="demo" Margin="8" />
                    <Button Style="{StaticResource ButtonStyle}" Content="demo" Margin="8" />
                    <Button Style="{StaticResource ButtonStyle}" Content="demo" Margin="8" />
                    <Button Style="{StaticResource ButtonStyle}" Content="demo" Margin="8" />
                    <Button Style="{StaticResource ButtonStyle}" Content="demo" Margin="8" />
                    <Button Style="{StaticResource ButtonStyle}" Content="demo" Margin="8" />
                    <Button Style="{StaticResource ButtonStyle}" Content="demo" Margin="8" />
                    <Button Style="{StaticResource ButtonStyle}" Content="demo" Margin="8" />
                </StackPanel>
            </t:LaunchPanel.LaunchContent>
        </t:LaunchPanel>
        <n:NavigationPanel 
            Name="navigationPanel" 
            MapName="map" 
            HorizontalAlignment="Left" 
            VerticalAlignment="Top" 
            Margin="-10"
            NavCircleScale="0.65"
            HorizontalToolBarLeft="65"
            VerticalToolBarTop="67"
            >
            <StackPanel>
                <Button Content="Your custom buttons here" />
            </StackPanel>
        </n:NavigationPanel>
        <p:PersistedState Name="persistedState" MapName="map" />
    </Grid>
</UserControl>

